package club.janna.concurrency.example.immutable;

import club.janna.concurrency.annotation.ThreadUnSafe;
import com.google.common.collect.Maps;

import java.util.HashMap;

@ThreadUnSafe
public class ImmutableExample1 {

    private static final int a = 1;
    private static final String s = "a";
    private static final HashMap<Integer, Integer> map = Maps.newHashMap();

    static {
        map.put(1, 1);
        map.put(2, 2);
        map.put(3, 3);
    }

    public static void main(String[] args) {
        //a = 2;
        //s = "c";
        map.put(1, 4);
        //map = Maps.newHashMap();
        System.out.println(map.get(1));
    }

    private void test(final int a) {
        //a = 2;
    }
}
